Skip to content

Release 4.2.0 - #131

Merged
cmp-202 merged 6 commits into
masterfrom
release/4.2.0
Nov 24, 2026
Merged

cmp-202 merged 6 commits into
masterfrom
release/4.2.0

Conversation

@cmp-202

@cmp-202 cmp-202 commented Nov 24, 2026

Copy link
Copy Markdown
Owner

Summary

Release 4.2.0 adds public editor/type support without changing runtime behavior.

  • Adds a hand-maintained index.d.ts describing the constructor, public methods, host and server configuration, handlers, events, and runtime state.
  • Points package.json types at ./index.d.ts and includes the declaration in the published files list. No TypeScript dependency, build step, or CI gate was added.
  • Adds JSDoc typedef aliases and // @ts-check in src/, with lib/ kept in sync through the normal build check.
  • Adds a concise README Editor support section and annotates the README-linked live tests as consumer-facing examples.
  • Adds a CHANGELOG entry, an L7.26 refactor-ledger entry, and an AI-assisted workflow prompt for maintaining declarations.

No connection or command-flow code changed.

Verification

  • tsc across sources and the annotated live tests: 0 errors
  • npm test: 229/229 unit passed; 174 passed / 55 skipped baseline
  • npm run check:changelog: passed for 4.2.0
  • git diff --check: clean
  • npm pack --dry-run: confirmed index.d.ts is included in the 4.2.0 tarball
  • Live suite: required from CI; not rerun locally because this release does not touch connection or command flow

Coverage summary

Coverage is diagnostic only: no coverage dependency and no CI coverage gate. The current figures are unchanged from test/coverage.md, measured on Node v26.13.0 on 2026-11-23, because this release adds declarations and documentation only.

Suite Target Lines Branches Functions
Unit lib/ssh2shell.js 96.98% 90.45% 100%
Unit lib/ssh2shell/defaults.js 97.96% 96.97% 100%
Unit lib/ssh2shell/util.js 97.91% 91.18% 100%
Unit all files 97.07% 90.81% 100%
Combined (unit ∪ live) all files 98.15% — —
Live src/ssh2shell.js 79.42% 56.95% 87.07%
Live src/ssh2shell/defaults.js 97.96% 50.00% 100%
Live src/ssh2shell/util.js 45.55% 36.84% 66.67%
Live all files 77.86% 56.03% 85.71%

Combined line union: 2912 of 2967 executable lines. Residual headline: 55 lines missed by both.

Full miss-overlap table:

File Executable lines Missed by unit Missed by live Missed by both Live covers unit miss Unit covers live miss
ssh2shell.js 2678 81 551 49 32 502
defaults.js 98 2 2 2 0 0
util.js 191 4 104 4 0 100
all files 2967 87 657 55 32 602

Measurement commands are documented in test/coverage.md: npm run build, the Node built-in coverage unit command against lib/, and the serial live command against src/. Raw LCOV files stay local.

Declares SSH2Shell, HostConfig, ServerConfig, handlers, and event payloads, and points package.json at index.d.ts. No TypeScript build or runtime dependency is added.
Links the runtime source to the public declaration file and annotates the main public and helper signatures. No TypeScript dependency or ts-check gate is added yet.
Adds the ts-check directive needed by editor tooling, with lib/ rebuilt to match src/.
Add hand-maintained index.d.ts and package types/files entries, JSDoc aliases and @ts-check in source, and README guidance with annotated README-linked live tests. Record the editor-support additions under Unreleased and add an AI-assisted workflow prompt for maintaining the declarations. Runtime behavior is unchanged.
Restore the constructor Stream/EventEmitter options pass-through and correct the editor declarations for hostVerifier key bytes and nullable error callbacks. Annotate the remaining README-linked keyboard-interactive example and record the review fixes.
@cmp-202
cmp-202 merged commit 904ec8f into master Nov 24, 2026
8 checks passed
@cmp-202
cmp-202 deleted the release/4.2.0 branch November 24, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant